package key2.exer3;

/**
 * @author shkstart
 * @date 2022/5/29 - 21:09
 */
public class HourlyEmployee extends Employee {
    private double wage;
    private int hour;

    public HourlyEmployee(String name, int number, MyDate birthday) {
        super(name, number, birthday);
    }
    public HourlyEmployee(String name, int number, MyDate birthday,int wage,int hour) {
        super(name, number, birthday);
        this.hour = hour;
        this.wage = wage;
    }

    public double earnings() {
        return wage * hour;
    }
    public String toString() {
        return "HourlyEmployee[" + super.toString() + "]";
    }

}
